<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<header th:fragment="nav">
    <div class="container" style="margin-top: 5px;">
        <nav class="navbar navbar-default well-sm" style="padding-left: 0px;" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#example-navbar-collapse">
                        <span class="sr-only">切换导航</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" th:href="@{/admin/toBookAdmin}">后台管理</a>
                </div>
                <div class="collapse navbar-collapse" id="example-navbar-collapse">
                    <ul class="nav navbar-nav pull-left">
                        <li >
                            <a th:href="@{/book/index}">前台首页</a>
                        </li>
                        <li >
                            <a th:href="@{/admin/toBookAdmin}">图书管理</a>
                        </li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                图书类型
                                <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a th:href="@{/admin/toBookAdmin(category=1)}">文学类</a>
                                </li>
                                <li class="divider"></li>
                                <li>
                                    <a th:href="@{/admin/toBookAdmin(category=2)}">经管类</a>
                                </li>
                                <li class="divider"></li>
                                <li>
                                    <a th:href="@{/admin/toBookAdmin(category=3)}">其他类</a>
                                </li>
                                <li class="divider"></li>
                            </ul>
                        </li>
                        <li th:if="${session.admin != null}">
                            <a href="javascript:void(0)" th:text="${session.admin.username}"></a>
                        </li>
                        <li th:if="${session.admin != null}">
                            <a th:href="@{/admin/logout}">&nbsp;退出账号</a>
                        </li>
                        <li>
                            <a th:href="@{/admin/toAllUsers}">客户管理</a>
                        </li>
                        <li>
                            <a th:href="@{/admin/toAppealList}">申诉管理</a>
                        </li>
                        <li>
                            <a th:href="@{/admin/toAllOrder}">订单管理</a>
                        </li>

                    </ul>
                    <div class="input-group col-md-3 pull-right" style="positon:relative;padding: 7px;">
                        <input type="text" class="form-control" id="inputBookName" placeholder="书名、作者、简介" />
                        <span class="input-group-btn">
					            <button class="btn btn-info btn-search" th:onclick="searchBookName()">
					            	<span class="glyphicon glyphicon-search"></span>
					            </button>
							</span>
                    </div>
                </div>
            </div>
        </nav>
    </div>
</header>
